package com.pctx.bibaregisterlogin.dao;

import com.pctx.bibaregisterlogin.pojo.User;
import com.pctx.bibaregisterlogin.pojo.UserExample;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Repository
public interface UserMapper {
    User selectByUsername(String username);

    User selectByMobile(String mobile);

    User selectByUpperleaderuuid(String upperleader);

    int countByExample(UserExample example);

    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(Long id);

    int deleteByname(String username);

    int update(User user);

    int updateByMobileSelective(User user);

    int updateByusername(User user);

    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExample(UserExample example);

    User selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

    int updateByExample(@Param("record") User record, @Param("example") UserExample example);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    List<User> selectHasSubordinate(String companyuuid);

    List<Map> get4Company(@Param("companyUuid") String companyUuid, @Param("username") String username, @Param
            ("startTime") Date startTime, @Param("endTime") Date endTime, @Param("departmentUuid") String
            departmentUuid, @Param("upperUuid") String upperUuid);

    User getByUuid(@Param("uuid") String uuid);
}